package kitto_test;

import static org.junit.Assert.*;

import java.util.ArrayList;

import kitto.Group;
import kitto.Student;
import kitto.Time;

import org.junit.Assert;
import org.junit.Test;

public class TestStudent {

	/**
	 * Test belong to group.
	 */
	@Test
	public void testBelongToGroup_1() {
		Group g1=new Group(111,111,new Time(540,15),"Eng",5);
		Student student=new Student(8001,"ABC",25,"Peter",'M');
		g1.addStudent(student);
		boolean result=student.belongToGroup(g1);
		Assert.assertTrue(result);
	}
	
	/**
	 * Test not belong to group.
	 */
	@Test
	public void testBelongToGroup_2() {
		Group g1=new Group(111,111,new Time(540,15),"Eng",5);
		Group g2=new Group(111,111,new Time(540,15),"Eng",5);
		Student student=new Student(8001,"ABC",25,"Peter",'M');
		g1.addStudent(student);
		boolean result=student.belongToGroup(g2);
		Assert.assertFalse(result);
	}
}
